/**
 * @desc 创建飞书文件夹同步笔记
 */
import { axios } from '@/plugins/axios';

export function useCreateLarkFolderNote() {
  const createLarkFolderNote = (
    /** 笔记ID，创建的飞书文件夹同步笔记位于这个笔记之下 */
    id: number,
    /** 飞书文件夹 Token */
    folderToken: string,
  ): Promise<note.LarkFolderNote> => {
    return axios({
      method: 'post',
      url: `/cn-knowledge/notebook/note/${id}/lark/folder/${folderToken}`,
    });
  };
  return { createLarkFolderNote };
}
